@if(count($topics))
    <div class="card-body">
        <ul class="list-group list-group-flush">
            {{--帖子列表--}}
            @foreach($topics as $topic)
                <li class="d-flex align-items-center list-group-item d-flex justify-content-between align-items-center topic_intro">


                    <div class="flex-grow-1 px-2">
                        <a class="text-decoration-none text-success"
                           href="{{$topic->link()}}">
                            {{$topic->title}}
                        </a>
                        <div>
                            <small><i class="fa-solid fa-list"></i> <a class="text-decoration-none"
                                                                       title="{{$topic->category->name}}"
                                                                       href="{{route('categories.show',$topic->category->id)}}">{{$topic->category->name}}</a></small>
                            <span>  ·   </span>
                            <small><a class="text-decoration-none" href="#"><i class="fa-solid fa-comment"></i> 最后回复人锚点</a></small>

                            <span>  ·   </span>
                            <small><i class="fa-regular fa-clock"></i>
                                {{$topic->created_at->diffForHumans()}}</a></small>

                        </div>
                    </div>
                    <span
                        class="pointerA badge bg-{{$topic->reply_count?'danger':'secondary'}} rounded-pill text-bg-dark">{{$topic->reply_count}}</span>
                </li>

            @endforeach
        </ul>
    </div>
    <div class="card-footer text-muted">
        @include('utils._pages',['data'=>$topics])
    </div>

@else
     @include('utils._nodata_topic')
@endif
